<template>
  <div class="calender2">
    <div class="date-header">
      <div class="pre-month"></div>
      <div class="show-date">2019年8月9日</div>
      <div class="next-month"></div>
    </div>
    <div class="date-content">
      <div class="week-header">
        <div v-for="item in weekList" :key="item">
          {{ item }}
        </div>
      </div>
      <div class="week-day">
        <div class="every-day" v-for="item in 42" :key="item">{{ item }}</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  data() {
    return {
      weekList: ["日", "一", "二", "三", "四", "五", "六"],
    };
  },
  mounted() {},
  methods: {},
};
</script>

<style lang='scss' scoped>
.calender2 {
  position: absolute;
  top: 10px;
  right: 0;
  height: 260px;
  width: 260;
  border: 1px solid #ccc;
  .date-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    width: 220px;
    .pre-month {
      border: 20px solid;
      border-color: transparent rgb(35, 137, 206) transparent transparent;
    }
    .next-month {
      border: 20px solid;
      border-color: transparent transparent transparent rgb(35, 137, 206);
    }
    .show-date {
      line-height: 40px;
      color: rgb(35, 137, 206);
    }
  }
  .week-header {
    background: rgb(35, 137, 206);
    color: #fff;
    font-size: 14px;
    text-align: center;
    width: 260px;
    line-height: 20px;
    div {
      display: inline-block;
      height: 20px;
      width: 30px;
    }
  }
  .week-day {
    width: 260px;
  }
}

.every-day {
  display: inline-block;
  height: 30px;
  width: 30px;
  text-align: center;
  line-height: 30px;
}
.other-day {
  color: #ccc;
}
.now-day {
  background: rgb(35, 137, 206);
}
.active-day {
  border: 2px solid rgb(35, 137, 206);
}
</style>
